package tree;

import data.Root_Data;
import cmd.Root_Cmd;
import data.Data_Book;
import data.Data_Canvas;


//叶结点
class Leaf {
   
   var m_parent : Tress;
   var root_cmd : Root_Cmd;
   var root_data : Root_Data;
   var root : Root;
   var data_canvas : Data_Canvas;
   var data_book : Data_Book;
   

   public function new() {
      
   }

   public function OnEnter(last : LeafKind) {
      root = Root.instance;
		root_cmd = cast Root.instance.GetLeaf(RCmd);
      root_data = cast Root.instance.GetLeaf(RData);
		data_canvas = cast Root.instance.GetLeafByPath([RData, DCanvas]);
		data_book = cast Root.instance.GetLeafByPath([RData, DBook]);
   }

   public function OnUpdate(msg : LeafMsg) {
         
   }

   public function OnExit(next : LeafKind) {
       
   }

   public function SetParent(parent:Tress) {
      m_parent = parent;
   }
}


